package com.sch.study.http;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * User: hui_stone
 * Date: 2015/3/8 0008
 * Time: 下午 19:23
 */
public class FastjsonTest {

    public static void main(String[] args) {

        Object o;
        Map map1 = new ConcurrentHashMap();
        Map map = new HashMap<String,String>();
        map.put("A","aaa");
        map.put("B","bbb");
        map.put("C","ccc");
        String jsonString = JSON.toJSONString(map);
        System.out.println(jsonString);
        JSONObject json = JSON.parseObject(jsonString);
        System.out.println(json.get("A"));
    }
}
